package com.zjcloud.jwgl.service.impl;

import java.util.List;
import com.zjcloud.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjcloud.jwgl.mapper.AcTeacherInfoMapper;
import com.zjcloud.jwgl.domain.AcTeacherInfo;
import com.zjcloud.jwgl.service.IAcTeacherInfoService;

/**
 * 教师信息Service业务层处理
 *
 * @author wxl
 * @date 2024-09-13
 */
@Service
public class AcTeacherInfoServiceImpl implements IAcTeacherInfoService
{
    @Autowired
    private AcTeacherInfoMapper acTeacherInfoMapper;

    /**
     * 查询教师信息
     *
     * @param id 教师信息主键
     * @return 教师信息
     */
    @Override
    public AcTeacherInfo selectAcTeacherInfoById(Long id)
    {
        return acTeacherInfoMapper.selectAcTeacherInfoById(id);
    }

    /**
     * 查询教师信息列表
     *
     * @param acTeacherInfo 教师信息
     * @return 教师信息
     */
    @Override
    public List<AcTeacherInfo> selectAcTeacherInfoList(AcTeacherInfo acTeacherInfo)
    {
        return acTeacherInfoMapper.selectAcTeacherInfoList(acTeacherInfo);
    }

    /**
     * 新增教师信息
     *
     * @param acTeacherInfo 教师信息
     * @return 结果
     */
    @Override
    public int insertAcTeacherInfo(AcTeacherInfo acTeacherInfo)
    {
        acTeacherInfo.setCreateTime(DateUtils.getNowDate());
        return acTeacherInfoMapper.insertAcTeacherInfo(acTeacherInfo);
    }

    /**
     * 修改教师信息
     *
     * @param acTeacherInfo 教师信息
     * @return 结果
     */
    @Override
    public int updateAcTeacherInfo(AcTeacherInfo acTeacherInfo)
    {
        acTeacherInfo.setUpdateTime(DateUtils.getNowDate());
        return acTeacherInfoMapper.updateAcTeacherInfo(acTeacherInfo);
    }

    /**
     * 批量删除教师信息
     *
     * @param ids 需要删除的教师信息主键
     * @return 结果
     */
    @Override
    public int deleteAcTeacherInfoByIds(Long[] ids)
    {
        return acTeacherInfoMapper.deleteAcTeacherInfoByIds(ids);
    }

    /**
     * 删除教师信息信息
     *
     * @param id 教师信息主键
     * @return 结果
     */
    @Override
    public int deleteAcTeacherInfoById(Long id)
    {
        return acTeacherInfoMapper.deleteAcTeacherInfoById(id);
    }
}
